<?php
namespace app\util;

class Common
{
    public function mapFile($file, $func)
    {
        var_dump($file);
        $f = fopen($file, 'r');
        for ($i = 0; $line = fgets($f); $i++) {
            $param = explode("\t", trim($line));
            if (count($param) > 97) {
                $param = array_splice($param, 0, -1);
            }
            $func($param);
        }
    }
}
